#ifndef RUNNINGCHART_H
#define RUNNINGCHART_H
#include <QObject>
#include <QVariant>
#include <QVariantList>
#include <QVariantMap>
#include <QRandomGenerator>
#include <QQuickItem>
#include <QTime>
#include <QWidget>
#include <QLabel>
#include <QHBoxLayout>
#include <QQuickWidget>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QMainWindow>

#include <QDebug>

#include "widgetanchor.h"
#include "experimentPro.h"
#include "mockInterface.h"

class RunningChart : public QObject
{
    Q_OBJECT

public:
    RunningChart();
    Q_INVOKABLE void load(); // 第一次加载初始化，后续不用再加载了
    Q_INVOKABLE void show();
    Q_INVOKABLE void refresh(QString equId, QString accessInfo, QString posInfo, int cycleNum=-1);
    Q_INVOKABLE void hide();

    Q_INVOKABLE QVariantList getChartData(QString equId, QString accessInfo, QString posInfo, int cycleNum=-1);

public:
    QQmlApplicationEngine*  engine = nullptr;
    ExperimentPro*          expPro = nullptr;
    MockInterface*          mock = nullptr;


    WidgetAnchor*           _anchor = nullptr;
};

#endif // RUNNINGCHART_H
